<?php
declare (strict_types = 1);

namespace app\admin\controller;

use think\facade\View;

class Users
{
    public function index()
    {

//        View::assign('title','后台首页-index');
//        $arr = [1,2,3,4];
//        $arr1 = ['name'=>'唐僧','age'=>28];
//        View::assign('arr',$arr);
//        View::assign('arr1',$arr1);
//        $arr2 = [
//            ['id' =>1,'name'=>'玉辉'],
//            ['id' =>2,'name'=>'阿辉'],
//            ['id' =>3,'name'=>'张玉辉'],
//            ['id' =>4,'name'=>'我是张玉辉'],
//        ];
//        View::assign('arr2',$arr2);

//
//        $obj = new\stdClass();
//        $obj -> id = 5;
//        $obj -> name = 'xiyouji';
//        View::assign('obj',$obj);
//        $arr1 = ['name'=>'唐僧','age'=>28];
//        View::assign($arr1);
//        View::assign(['name'=>'唐僧','age'=>28]);
//        $arr2 = [
//            ['id' =>1,'name'=>'玉辉'],
//            ['id' =>2,'name'=>'阿辉'],
//            ['id' =>3,'name'=>'张玉辉'],
//            ['id' =>4,'name'=>'我是张玉辉'],
//        ];
        $arr = ['张玉辉1','张玉辉2','张玉辉3'];
        $name = '666';
        View::assign('arr',$arr);
        View::assign('name',$name);


        View::assign('value',1);
     $arr2 = [
            ['id' =>1,'name'=>'玉辉'],
            ['id' =>2,'name'=>'阿辉'],
            ['id' =>3,'name'=>'张玉辉'],
            ['id' =>4,'name'=>'我是张玉辉'],
        ];
        View::assign('arr2',$arr2);
        return View::fetch();
    }


}
